package me.zhengjie.poemQuestions.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.poemQuestions.domain.PoemQuestions;
import me.zhengjie.poemQuestions.domain.UserAnswerRecord;
import me.zhengjie.poemQuestions.domain.vo.UserAnswerRecordQueryCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserAnswerRecordMapper extends BaseMapper<UserAnswerRecord> {

    IPage<UserAnswerRecord> findAll(@Param("criteria") UserAnswerRecordQueryCriteria criteria, Page<Object> page);

    List<String> findWeakCategories(@Param("userId") Integer userId, @Param("limit") int limit);

    List<PoemQuestions> recommendFromCategory(@Param("category") String category, @Param("limit") int limit);

}
